package com.konke.sdslibrary;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.konke.sdslibrary.model.UniformDeviceType;
import com.sds.sdk.android.sh.common.SHClientState;
import com.sds.sdk.android.sh.common.SHDeviceRealType;
import com.sds.sdk.android.sh.common.SHDeviceType;
import com.sds.sdk.android.sh.common.SHGuardSensorType;
import com.sds.sdk.android.sh.internal.request.ChopinFreshAirConfigArgsResult;
import com.sds.sdk.android.sh.internal.request.FancoilConfigArgsResult;
import com.sds.sdk.android.sh.internal.request.FloorheatingConfigArgResult;
import com.sds.sdk.android.sh.internal.request.GetFreshAirStatusResult;
import com.sds.sdk.android.sh.model.Action;
import com.sds.sdk.android.sh.model.AddCodeLibResult;
import com.sds.sdk.android.sh.model.AddCodedLockUserResult;
import com.sds.sdk.android.sh.model.AddSceneResult;
import com.sds.sdk.android.sh.model.AirBoxNodeArgResult;
import com.sds.sdk.android.sh.model.ArmingState;
import com.sds.sdk.android.sh.model.CnwiseMusicControllerStatus;
import com.sds.sdk.android.sh.model.CodeLibBaseResult;
import com.sds.sdk.android.sh.model.CodeLibBindResult;
import com.sds.sdk.android.sh.model.CodeLibTaskResult;
import com.sds.sdk.android.sh.model.Condition;
import com.sds.sdk.android.sh.model.Controller;
import com.sds.sdk.android.sh.model.Device;
import com.sds.sdk.android.sh.model.DeviceOnlineState;
import com.sds.sdk.android.sh.model.FancoilSmartModel;
import com.sds.sdk.android.sh.model.Gateway;
import com.sds.sdk.android.sh.model.GetAirBoxDayStatisitcResult;
import com.sds.sdk.android.sh.model.GetAirBoxStateResult;
import com.sds.sdk.android.sh.model.GetAirSwitchStatusResult;
import com.sds.sdk.android.sh.model.GetCcuInfoResult;
import com.sds.sdk.android.sh.model.GetCcuVersionResult;
import com.sds.sdk.android.sh.model.GetCodedLockUserInfoResult;
import com.sds.sdk.android.sh.model.GetCodelibButtonsResult;
import com.sds.sdk.android.sh.model.GetCodelibResult;
import com.sds.sdk.android.sh.model.GetDayPowerResult;
import com.sds.sdk.android.sh.model.GetDevDetectedPowerResult;
import com.sds.sdk.android.sh.model.GetDevHwInfoResult;
import com.sds.sdk.android.sh.model.GetDevInfoResult;
import com.sds.sdk.android.sh.model.GetDimmableLightConfigResult;
import com.sds.sdk.android.sh.model.GetElectricalClearingDateResult;
import com.sds.sdk.android.sh.model.GetElectricalClearingInfoResult;
import com.sds.sdk.android.sh.model.GetElectricalEnergyArgsResult;
import com.sds.sdk.android.sh.model.GetElectricalEnergyValueResult;
import com.sds.sdk.android.sh.model.GetElectricalSwitchStatusResult;
import com.sds.sdk.android.sh.model.GetFancoilSmartModelResult;
import com.sds.sdk.android.sh.model.GetFancoilSystemStatusResult;
import com.sds.sdk.android.sh.model.GetFloorheatingStatusResult;
import com.sds.sdk.android.sh.model.GetGwWhitelistResult;
import com.sds.sdk.android.sh.model.GetGwWorkmodeResult;
import com.sds.sdk.android.sh.model.GetHomebridgeStatusResult;
import com.sds.sdk.android.sh.model.GetInfraredLastSendCodeResult;
import com.sds.sdk.android.sh.model.GetLocalCodelibsResult;
import com.sds.sdk.android.sh.model.GetLockOpenRecordResult;
import com.sds.sdk.android.sh.model.GetLockUserListResult;
import com.sds.sdk.android.sh.model.GetMonthPowerResult;
import com.sds.sdk.android.sh.model.GetMusicListResult;
import com.sds.sdk.android.sh.model.GetSocketRunArgsResult;
import com.sds.sdk.android.sh.model.GetYearPowerResult;
import com.sds.sdk.android.sh.model.GetYouzhuanMusicListResult;
import com.sds.sdk.android.sh.model.GetZbDevOnlineSwitchResult;
import com.sds.sdk.android.sh.model.GetZigbeeDevPingResult;
import com.sds.sdk.android.sh.model.Group;
import com.sds.sdk.android.sh.model.IFTTT;
import com.sds.sdk.android.sh.model.IFTTTEX;
import com.sds.sdk.android.sh.model.Limit;
import com.sds.sdk.android.sh.model.MotorOpt;
import com.sds.sdk.android.sh.model.PrepareTestCodeLibResult;
import com.sds.sdk.android.sh.model.Room;
import com.sds.sdk.android.sh.model.Scene;
import com.sds.sdk.android.sh.model.ShortcutPanelConfig;
import com.sds.sdk.android.sh.model.TextIndicatorResult;
import com.sds.sdk.android.sh.model.VoidResult;
import com.sds.sdk.android.sh.model.WhiteDev;
import com.sds.sdk.android.sh.model.ZigbeeFanCoilStatus;
import com.sds.sdk.android.sh.model.ZigbeeFloorHeatingStatus;
import com.sds.sdk.android.sh.model.ZigbeeFreshAirStatus;

import java.util.List;

/**
 * 中控主机上下文:管理中控主机区域、设备，控制各种设备
 */
public interface HostContext {

    void reconect(int delay);

    boolean syncHostData();

    List<Device> findNewDevice();

    List<Device> findNewDeviceByType(UniformDeviceType deviceType);

    List<Device> findDeviceByType(UniformDeviceType deviceType);

    Device findDeviceById(int id, UniformDeviceType deviceType);

    Device findDeviceById(String id, UniformDeviceType deviceType);

    Device findDeviceById(int id, SHDeviceType deviceType);

    SHDeviceRealType findDeviceRealType(int id, UniformDeviceType deviceType);

    List<Device> findZigbeeSocket(SHDeviceType shDeviceType);

    Device findZigbeeDeviceById(int id);

    DeviceOnlineState findZigbeeDeviceOnlineState(String mac);

    Scene findSceneById(int id);

    Scene findSceneWithPanel(int id);

    Group findGroupById(int id);

    IFTTT findRuleById(int id);

    IFTTTEX findExRuleById(int id);


    VoidResult deleteAlarmMsg(String key);


    GetCcuVersionResult queryCcuVersion();

    GetCcuInfoResult queryCcuInfo();

    GetDevInfoResult queryDevInfo(int id);

    CnwiseMusicControllerStatus queryCnwiseStatus(int id);

    List<GetMusicListResult.MusicListBean> queryCnwiseMusicList(int id);

    List<GetDayPowerResult.RecordsBean> queryPowerByDay(int id, String start, String end);

    List<GetMonthPowerResult.RecordsBean> queryPowerByMonth(int id, String start, String end);

    List<GetYearPowerResult.RecordsBean> queryPowerByYear(int id, String start, String end);

    String queryDevPower(int id);


    boolean upgradeKitCcu(String url);

    void tryLan();

    void cancelWarning();

    void readAlarm(String key);

    void readAlarm(String startTime, String endTime);

    void clearSosAlarm(int id);

    boolean setRoomDnd(int roomId, boolean on);

    VoidResult restoreCcu(String fromCcuId, String url);

    VoidResult backupCcu();

    GetZigbeeDevPingResult pingZigbeeDev(int gwId, String[] devMacs);


    VoidResult switchHomebridge(String id, boolean on);

    GetHomebridgeStatusResult getHomebridgeStatus(String id);

    GetDevHwInfoResult getDevicesHwInfo(String[] macs);

    String getZigbeeDevHwVersion(String mac);

    Gateway findGetewayInfo(String mac);

    VoidResult resetGwFouctoryMode(int gwId);


    /*****************************
     * 查询房间、设备信息 roomid:-1 means all room
     ***************************************/


    ArmingState queryCcuArmingState();

    List<Integer> getCustomGuardZones();

    boolean setCustomZoneGuard(int[] roomIds);

    int getSecurityLeaveHomeDelay();

    boolean setSecurityLeaveHomeDelay(int delay);

    boolean setSecurityState(ArmingState armingState);

    String getCurCcuVersion();

    SHClientState queryHostState();


    List<Room> findAllRoom();

    List<Device> findDeviceInGw(String gwmac);

    List<Device> findDeviceByMac(String mac);

    int findZigbeeDeviceProductId(String mac);

    List<Device> findDeviceInGw(int roomId, String gwmac);

    List<Device> findDeviceInRoom(int roomId);

    List<Device> findDeviceInRoom(int roomId, UniformDeviceType deviceType);

    List<Scene> findSceneInRoom(int roomId);

    List<Group> findGroupList();

    List<IFTTT> findIftttRules();

    List<IFTTTEX> findIftttExRules();

    Controller findController(int id);

    int queryOnLightCount(List<Device> devices);

    int queryOpenCurtainCount(List<Device> devices);

    double queryAvgTemp(List<Device> devices);

    double queryAvgHumi(List<Device> devices);

    boolean doorIsOpen(List<Device> devices);

    boolean hasPerseon(List<Device> devices);

    SHGuardSensorType findGuardSensorType(int id);

    GetLockUserListResult getLockUserList(int devId);

    GetLockOpenRecordResult getLockOpenRecordList(int id, int pageIdx, int pageSize, String beginDay, String endDay);

    GetInfraredLastSendCodeResult getInfraredGetLastSendCode(int devId);

    GetGwWorkmodeResult getGwWorkmode(int gwId);

    VoidResult setGwWorkmode(int gwId, int workMode);

    GetGwWhitelistResult getGwWhitelist(int gwId);

    VoidResult addGwWhiteList(int gwId, List<WhiteDev> devList);

    VoidResult delGwWhiteList(int gwId, String[] devMacs);

    List<Device> findZigbeeDevicesByLast4Mac(String lastMac);

    List<Device> findDevicesByName(String devName);

    /*****************************
     * 增加房间、设备信息
     ***************************************/

    void searchIPC();

    AddSceneResult addScene(String sceneType, String sceneImange, String name, int roomId);

    Scene editScene(int id, String sceneType, String sceneImange, String name, int roomId);

    boolean setSceneTimer(int id, boolean enableTimer, String timer, List<String> week);

    boolean setSceneAction(int id, List<Action> actionList);

    Group editGroup(int id, String name, List<String> deviceId);

    IFTTT addIFttt(String name, int roomId, boolean notificationEnable, boolean ruleEnable, List<Condition> conditionList, List<Action> actionList);

    IFTTT editIFttt(int id, String name, int roomId, boolean notificationEnable, boolean ruleEnable, List<Condition> conditionList, List<Action> actionList);

    IFTTTEX addIFtttEx(String name, int roomId, boolean notificationEnable, boolean ruleEnable, List<Condition> conditionList, List<Limit> limitList, List<Action> actionList);

    IFTTTEX editIFtttEx(int id, String name, int roomId, boolean notificationEnable, boolean ruleEnable, List<Condition> conditionList, List<Limit> limitList, List<Action> actionList);

    boolean enableIfttt(int id, boolean enable);

    boolean enableIftttEx(int id, boolean enable);


    boolean editGwName(int gwId, String gwName);

    boolean editLockUser(int id, int userId, int openType, String nickName);

    boolean editLockPassword(int id, String oldpwd, String newpwd);

    boolean setShortcutPanelAction(int id, List<ShortcutPanelConfig> configList);

    void activeShortcutPanel(int id, int buttonId);

    boolean bindScene(int deviceId, int sceneId);

    Device editModbus(int id, int roomId, String name);


    Device editCentralAcGw(int id, int roomId, String name);


    VoidResult replaceDevice(String newDevMac, String oldDevMac, String gwMac);

    /*****************************
     * 删除房间、设备信息
     ***************************************/

    boolean inShortCutPanel(int nodeId);

    boolean inController(int nodeId);

    boolean inLock(int nodeId);

    boolean isBindWithLock(int nodeId);

    boolean inGroup(int nodeId);

    List<Group> findGroupsByDeviceId(int nodeId);

    boolean inScene(UniformDeviceType deviceType, int nodeId);

    boolean inIFTTT(UniformDeviceType deviceType, int nodeId);

    boolean delRoom(int roomId);

    boolean delDevice(int deviceId, String mac, UniformDeviceType deviceType);

    boolean delScene(int id);

    boolean delGw(int gwId);

    boolean upgradeGw(int gwId);

    boolean upgradeGw9531(int gwId, String url);

    GetZbDevOnlineSwitchResult getZbDevSwitchStatus(int gwId);

    VoidResult setZbDevOnlineSwitch(int gwId, String arg);

    boolean delGroup(int gid);

    boolean delIFttt(int gid);

    boolean delIFtttEx(int ruleId);

    boolean recycleDevice(int deviceId, UniformDeviceType deviceType);


    /*****************************
     * 操控设备
     ***************************************/
    boolean optDaikinIndoorUnit(int id, boolean on, String runModel, String speed, int temp);

    boolean openGateway(int gwId);

    boolean closeGateway(int gwId);

    boolean optCentralAcIndoorUnit(int id, boolean on, String runModel, String speed, int temp);

    boolean openHueGateway(int gwId);

    boolean activateHueGateway(int gwId);

    void updateHostArming(ArmingState state);

    void switchRoomLights(int roomId, boolean on);

    void optRoomCurtains(int roomId, String operation);

    VoidResult adjustAlertorVolume(int id, int vol);

    //开关灯
    void switchLight(int devId, boolean on);

    VoidResult switchDevice(int devId, boolean on);

    boolean adjustIllum(int devId, int bri);

    boolean adjustColor(int devId, int[] rgb);

    boolean adjustDimmerWhiteIlum(int id, int bri);

    boolean adjustRgbwPickedColor(int id, int modeId, int[] rgb, int bri, int whiteBri);

    VoidResult setDimmerRealIlum(int id, int bri);

    GetDimmableLightConfigResult getdimmableLightConfig(int id);

    VoidResult setDimmableLightConfig(int id, int softOn, int briLow, int briHigh);

    boolean adjustRgbwDymanicColor(int id, int modeId);

    //得到设备应用参数
    JsonArray getDeviceAppArgs(int id, UniformDeviceType type);

    boolean setDeviceAppArg(int id, UniformDeviceType devType, String argType, JsonElement arg);

    boolean setDeviceCcuArg(int id, UniformDeviceType devType, String argType, JsonElement arg);

    //开关插座
    void switchSocket(int devId, boolean on);

    TextIndicatorResult getTextIndicatorStatus(int devId);

    VoidResult setTextIndicatorArgs(int devId, int offTime);

    boolean switchSocketChannel(int devId, int channel, boolean on);

    boolean setSocketPowerConfig(int devId, String power, boolean powerOff, boolean powerRemember);

    GetSocketRunArgsResult getSocketPowerConfig(int devId);

    Boolean identify(int id);

    Boolean closeAlertor(int deviceId);

    Boolean switchZigbeeKonkeLight(int devId, boolean on);

    void switchKSocket(int devId, boolean on);

    void switchKSocketUsb(int devId, boolean on);

    void switchKSocketLight(int devId, boolean on);

    boolean switchKLock(int devId, String password, boolean on);

    VoidResult swithCodedLock(int devId, String password, boolean on);

    //情景模式操作
    void executeScene(int sceneId);

    //电机操作
    void operateMotor(int devId, String operation);

    boolean dooyaMotorSeek(int devId, int pos);

    boolean dooyMotorRouteCfg(int devId);

    boolean dooyaSetReverse(int devId, boolean on);

    boolean dooyaGetReverse(int devId);

    VoidResult motorSmartConfig(int devId, String cmd, String cmdArg);

    //晾衣架操作
    VoidResult driveAirerLightOpt(int id, boolean on);

    VoidResult driveAirerMotorOpt(int id, MotorOpt opt);

    VoidResult driveAirerAirDryOpt(int id, boolean on, int timeInMinutes);

    VoidResult driveAirerStovingOpt(int id, boolean on, int timeInMinutes);

    VoidResult driveAirerSterilizeOpt(int id, boolean on, int timeInMinutes);

    //地暖控制器
    VoidResult setFloorHeatingTemp(int id, double temp);

    VoidResult setFloorHeatingTemp(int id, int temp);

    VoidResult setFloorHeatingMode(int id, boolean autoElseManual);

    VoidResult setFloorHeatingPlan(int id, List<ZigbeeFloorHeatingStatus.SettingZone> zoneList);

    boolean isFloorHeatingSingleDayOff(int id);

    VoidResult setFloorheatingOffTime(int id, String offTime);

    VoidResult setFloorheatingLockStatus(int id, boolean lock);

    FloorheatingConfigArgResult getFloorheatingConfigArgs(int id);

    //地暖网关

    VoidResult setFloorhearManagerOpt(int id, int[] channal, boolean on);

    GetFloorheatingStatusResult getFloorheatDevStatu(int id);

    VoidResult setFloorheatingDevTemp(int id, double temp);

    VoidResult setFlootheatingDevLock(int id, boolean lock);

    //新风设备
    boolean freshAirSwitch(int id, boolean on);

    boolean freshAirSetRunModel(int id, ZigbeeFreshAirStatus.RUNMODEL runModel);

    boolean freshAirSetWorkModel(int id, ZigbeeFreshAirStatus.WORKMODEL workModel);

    boolean freshAirSetSpeed(int id, ZigbeeFreshAirStatus.SPEEDLELVEL speed);

    String freshAirGetCo2(int id);

    String freshAirGetPm25(int id);

    boolean freshAirSetFilterScreenWorkTime(int id, int timeIn100h);

    boolean freshAirResetFilterScreen(int id);

    VoidResult freshAirSetLockStatus(int id, boolean lock);

    ChopinFreshAirConfigArgsResult getChopinFreshAirConfigArgs(int id);

    VoidResult setFreshAirOffTime(int id, String timeOff);

    VoidResult setChopinFreshAitAlarmTime(int id, boolean reset, int alarmTime);

    //新风网关
    GetFreshAirStatusResult getFreshAirDevStatus(int devId);

    VoidResult setFreshAirDevSpeed(int devId, int speed);

    VoidResult setFreshAirDevMode(int devId, int mode);

    VoidResult resetFreshAirDevFilterTime(int devId);

    VoidResult setFreshAitDevFilterAlarmTime(int devId, int time);


    //hue操作
    void operateHue(int devId, boolean on, int bri, double[] xy);

    void operateKLight(int devId, String mode, boolean on, int bri, int[] rgb, int speed);

    void operateInfrared(int devId, int code);

    boolean sendInfrared(int devId, int code);

    void learnInfrared(int id, int code);

    boolean saveInfrared(int id, int code);

    boolean saveInfraredRC(int id, List<Controller.Button> buttons);

    boolean operateRF(int devId, int code);

    void learnRF(int id, int code);

    boolean saveRF(int id, int code);

    boolean saveRFRC(int id, List<Controller.Button> buttons);

    GetDevDetectedPowerResult getDevDetectPowerResult(int id);

    boolean setDevDetectPowerByHand(int id, String standby, String running);

    boolean activeDevDetectPower(int id);

    void detectDevStandByPower(int id);

    void detectDevRunningPower(int id);

    void controllerSmartSwitch(int id, boolean on);

    //获得红外绑定代码库
    GetCodelibResult getInfraredBindCodelib(int id);

    CodeLibBaseResult renameLocalCodelib(int codeId, String codelibName);

    void resetInfraredBindCodelib(int id);

    CodeLibBaseResult uploadCodelibToCloud(int codelibId);

    GetLocalCodelibsResult getInfraredCodelib(String devType);

    CodeLibBindResult getCodelibBindInfrareds(int libId);

    CodeLibBaseResult deleteInfraredCodelib(int libId);

    AddCodeLibResult addInfraredCodelib(int devId, String devType, String libName, String codeLibLocation);

    CodeLibBaseResult testInfraredCodelib(int devId, int libId, int code);

    CodeLibBaseResult testCloudCodelib(int devId, int cloudLibId, int code);

    CodeLibBaseResult prepareTestCloudCodeLib(int cloudLibId);

    PrepareTestCodeLibResult downloadCodeLibFromCloud(int cloudLibId, int type, String devType, String devBound, String devModel, String name, String pcode);

    void matchInfraredCodelib(int libId, String devType);

    CodeLibTaskResult getCodelibWorkingTask();

    GetCodelibButtonsResult getCodelibUiButtons(int libId);

    void uploadCodelib(int id, int libId);

    boolean bindLockDoorcontact(int id, int doorcontactId);

    boolean bindInfraredSocket(int id, int socketId);

    //音乐主机
    boolean musicControllerPlayPause(int id);

    boolean musicControllerPlayPre(int id);

    boolean musicControllerPlayNext(int id);

    boolean musicControllerPlayInMusicList(int id, int musicIndex);

    boolean musicControllerPlaySeek(int id, int seekTimeInMs);

    boolean setMusicControllerVolume(int id, int volume);

    boolean setMusicControllerZoneVolume(int id, int zoneId, int zoneVolume, boolean volSwitch);

    boolean setMusicControllerZoneName(int id, int zoneId, String name);

    boolean changeMusicControllerLoopMode(int id);

    boolean enbaleMusicControllerEQ(int id, boolean enable);

    boolean setMusicControllerEqMode(int id, String mode);

    //    右转音乐主机
    List<GetYouzhuanMusicListResult.MusicListBean> queryYouzhuanMusicList(int id, String arg);

    VoidResult setYouzhuanMusicPlay(int id);

    VoidResult setYouzhuanMusicPause(int id);

    VoidResult playYouzhuanMusicPre(int id);

    VoidResult playYouzhuanMusicNext(int id);

    VoidResult playYouzhuanMusicByIndex(int id, int index);

    VoidResult setYouzhuanMusicSeek(int id, int pos);

    VoidResult setYouzhuanMusicVol(int id, int vol);

    VoidResult setYOuzhuanMusicLoopModel(int id, int model);

    VoidResult setYouzhuanMusicEq(int id, int eq);

    VoidResult setYouhzuanMusicSource(int id, int source);

    VoidResult startSearchYouzhuanMusic();

    VoidResult stopSearchYouzhuanMusic();

    Device editYouzhuanMusic(int id, String name, int roomId);

    VoidResult delYouzhuanMusic(int id);

    //加湿器
    boolean setHumidifierFogVol(int devId, int vol);

    boolean setHumidifierOnOff(int devId, boolean on);

    boolean setHumidifierConstantWet(int devId, boolean on, int vol);
    //净化器

    boolean setAircleanrWindVol(int devId, int vol);

    boolean setAircleanrOnOff(int devId, boolean on);

    boolean setAircleanrAnionOnOff(int devId, boolean on);

    boolean setAircleanrSleepOnOff(int devId, boolean on);

    boolean setAircleanrAutoOnOff(int devId, boolean on);

    //风机盘管

    VoidResult setFancoilSmartModel(int id, FancoilSmartModel SmartModel);

    VoidResult setFancoilSmartModel(int id, int modelId);

    VoidResult setFancoilDelay(int id, boolean onEnable, String onDelayTime, boolean offEnable, String onOffDelayTime);

    VoidResult setFancoilTemp(int id, String temp);

    VoidResult setFancoilSpeed(int id, ZigbeeFanCoilStatus.FANSPEED fanspeed);

    VoidResult setFancoilRunModel(int id, ZigbeeFanCoilStatus.RUNMODEL runmodel);

    GetFancoilSmartModelResult getFancoilSmartModel(int id);

    boolean saveFancoilCustomSmartModel(int id, FancoilSmartModel model);

    FancoilSmartModel getFancoilCustomSmartModel(int id);

    GetFancoilSystemStatusResult fancoilGetSystemStatus(int id);

    VoidResult fancoilSetLocking(int id, String locking);

    VoidResult fancoilSetLockStatus(int id, boolean lock);

    FancoilConfigArgsResult getFancoilConfigArgs(int id);


    //电能表

    GetElectricalEnergyValueResult getElectricalEnergyValues(int id);

    GetElectricalEnergyArgsResult getElectricalEnergyArgs(int id);

    GetElectricalClearingInfoResult getElectricalClearningInfoResult(int id);

    GetElectricalClearingDateResult getElectricalClearningDateResult(int id);

    GetElectricalSwitchStatusResult getElectricalSwitchStatus(int id);

    VoidResult setElectricalSwitch(int id, boolean on);

    VoidResult editCodedLockUser(int id, int userId, int openType, boolean hijack, boolean permission, String key, int openTimes, String startTime, String endTime);

    //密码锁

    GetCodedLockUserInfoResult getCodedLockUser(int id, int userId);

    AddCodedLockUserResult addCodedLockUser(int id, int openType, boolean permission, boolean hijack, String key);

    VoidResult delCodedLockUser(int id, int[] userId);

    VoidResult delCodedLockAllUser(int id);

    VoidResult codedlockEnterCardmode(int id, boolean encrypt);

    //空开
    VoidResult clearAirSwitchAlarm(int id);

    GetAirSwitchStatusResult getAirSwitchStatus(int id);

    //空气质量盒子

    VoidResult addAirBox(String mac, String type);

    Device setAirBox(int devId, String name, int roomId);

    GetAirBoxStateResult getAirBoxStete(int devId, int arg);

    GetAirBoxDayStatisitcResult getAirBoxDayStatisitc(int devId, String field, String start, String end);

    AirBoxNodeArgResult getAirboxNodeArg(int devId);

    void resetTimeInterval();

    /////###############销毁中控上下文######################################/////

    void destroy();
}
